package com.foundersoftware.commons.task.model;

import java.util.Locale;

/**
 * This enumeration class is used to describe the task source.
 * @author wuhongjun
 *
 */
public enum TaskFromType {
  /**
   * The task is from oneself. 
   */
  SelfCreateAndAssigned(1,"Self Created","task.fromtype.selfCreatedAndAssigned",1), 
  
  /**
   * Represented the task from others,such as leader or director. 
   */
  FromOthers(2,"Others","task.fromtype.fromOthers",2),
  
  /**
   *Represented the task from System,such as workflow system.
   */
  AutoCreatedAndAssigned(3,"System","task.fromtype.autoCreatedAndAssigned",3);
 
 private final int id;
 private final String name;
 private final String displayNameKey;
 private Locale locale = null;
 private final int orderInt;
 
 private TaskFromType(int id,String name,String displayNameKey,int orderInt) {
	 this.id = id;
	 this.name = name;
	 this.displayNameKey = displayNameKey;
	 this.orderInt = orderInt;
	 
 }
 
public Locale getLocale() {
	if(null == locale) {
		locale = Locale.getDefault();
	}
	return locale;
}

public void setLocale(Locale locale) {
	this.locale = locale;
}

public String getDisplayNameKey() {
	return displayNameKey;
}

public int getId() {
	return id;
}



public String getName() {
	return name;
}



public String getDisplayName() {
	return "";
}

public int getOrderInt() {
	return orderInt;
}



}
